﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace NASA.BeAMartian.TagGraph.Surveying
{

    public class ImageFeature : IComparable
    {
        private ImageTagTypes _tagType;
        public ImageTagTypes TagType
        {
            get { return _tagType; }
            set { _tagType = value; }
        }

        public int CompareTo(object obj)
        {
            if (obj is ImageFeature)
            {
                ImageFeature p2 = (ImageFeature)obj;
                return Feature.CompareTo(p2.Feature);
            }
            else
                throw new ArgumentException("Object is not a ImageFeature.");
        }


        private string _featureLong;
        public string FeatureLong
        {
            get { return _featureLong; }
            set { _featureLong = value; }
        }

        private string _feature;
        public string Feature
        {
            get { return _feature; }
            set { _feature = value; }
        }

        private string _description;
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        private string _imgURL1;
        public string ImgURL1
        {
            get { return _imgURL1; }
            set { _imgURL1 = value; }
        }

        private string _imgURL2;
        public string ImgURL2
        {
            get { return _imgURL2; }
            set { _imgURL2 = value; }
        }

        private bool _isSelected;
        public bool IsSelected
        {
            get { return _isSelected; }
            set { _isSelected = value; }
        }

        public ImageFeature(ImageTagTypes type, string feature, string description, string img)
        {
            _tagType = type;
            _featureLong = feature;
            _feature = feature.Replace("Rover Features - ", "").Replace("Mars Features - ", "");
            _description = description;
            _imgURL1 = img;
            _imgURL2 = img.Replace("1", "2");

        }


        public override bool Equals(object obj)
        {
            return Feature.Equals((obj as ImageFeature).Feature);
            //return base.Equals(obj);
        }   
    }

}
